home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.c
- Subject: Re: Unbuffered character input...
- Date: 6 Feb 1996 16:22:21 -0600
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4f8kat$ofv@solutions.solon.com>
- References: <Pine.SGI.3.91.960129190205.27936A-100000@tahiti.cs.unm.edu> <9602022043.AA13287@dxmint.cern.ch> <4f7hlf$87n@airdmhor.gen.nz> <9602061701.AA21789@dxmint.cern.ch>
- NNTP-Posting-Host: solutions.solon.com
-
- In article <9602061701.AA21789@dxmint.cern.ch>,
- Dan Pop <danpop@mail.cern.ch> wrote:
- >But even on systems where it is not, it still saves processor time.
- >The cpu overhead of making a single OS call to get a complete line of input
- >is smaller (sometimes significantly smaller) than the overhead of making
- >N OS calls, one for each character of the line. The stdio library tries
- >to do its best to minimize the number of (expensive) OS calls.
-
- Further, in some cases, it can be dramatically more uer efficient
- and user friendly to be line buffered. The keyboard I'm typing
- on right now is about 30 gateways from the editor I'm typing to.
- If I were using a line buffered system, I would be able to see and correct
- my typos *instantly* (Would you believe less than 50 msec. response
- time?) rather than having to wait 30 seconds to a minute to see what I'm
- doing. In fact, if I weren't on a buggy Sun system, I'd even be able to have
- the system switch modes, so that only applications incapable of using line
- buffering would have the slower response. (Sun's telnet doesn't understand
- this quite right, and will botch horribly.)
-
- This is drifting pretty far; please direct responses to me or others in
- email.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- Using trn? Weird new newsgroup problem? I know the fix! Email me!
- The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq - Not A Flying Toy
-